set the foreColor of line getAt(gallList, n) + 4 of field "showALlMenu 2" to 5
end repeat
end
on stopMovie
global gOldColorDepth
set the colorDepth to gOldColorDepth
updateStage()
if cpuType = #mac then
closeXLib("PrintXObj")
else
if the machineType = 256 then
closeXLib("Print_X")
end if
end if
end
on Checkit
if (the key = RETURN) or (the key = TAB) or (the key = ENTER) then
dontPassEvent()
go(#next)
set downcount to integer(the text of field "Numleft field")
put downcount - 1 into field "numleft field"
end if
end
on NoReturn
if (the key = RETURN) or (the key = TAB) or (the key = ENTER) then
dontPassEvent()
nothing()
end if
end
on CommandQuit
if the commandDown and (the key = ".") then
QuitNow()
end if
end
on EnterRoll
if rollOver(4) then
set the castNum of sprite 4 to the number of cast "EnterRoll"
else
set the castNum of sprite 4 to the number of cast "EnterUp"
updateStage()
end if
end
on EnterRestaurant
global gOpenGates, gPasswordList, gPassword, gWhichMenu
if gOpenGates = 1 then
puppetSprite(4, 0)
set gWhichMenu to "showAllMenu"
go("Main")
else
set gPassword to getAt(gPasswordList, integer(field "codeNumber"))
put getAt(gPasswordList, integer(field "codeNumber")) into field "Password"
updateStage()
puppetSprite(4, 0)
go("Password")
end if
end
on GoPassword
go("password")
end
on ActiveRecipes
global gOpenGates, gWhichMenu
set PoultryList to [4, 10, 17]
set SeaList to [4, 10, 16]
set MeatList to [4, 10]
set AppsList to [4, 10, 16]
set ExtraList to [6, 13, 25]
set PastaList to [4, 9, 15]
set DessertList to [4, 10, 15]
if the foreColor of word 3 of line 2 of field gWhichMenu = 5 then
nothing()
else
set the foreColor of field gWhichMenu to 246
put "Recipes in YELLOW are the active recipes in this demo" into line 2 of field gWhichMenu
set the foreColor of word 3 of line 2 of field gWhichMenu to 5
set the textSize of line 2 of field gWhichMenu to 10
updateStage()
if the name of cast gWhichMenu = "PoultryMenu" then
repeat with n = 1 to 3
set theOffset to getAt(PoultryList, n)
put theOffset
set the foreColor of line getAt(PoultryList, n) of field the castNum of sprite 15 to 5
updateStage()
end repeat
end if
if the name of cast gWhichMenu = "SeaMenu" then
repeat with n = 1 to 3
set the foreColor of line getAt(SeaList, n) of field the castNum of sprite 15 to 5
updateStage()
end repeat
end if
if the name of cast gWhichMenu = "MeatMenu" then
repeat with n = 1 to 2
set the foreColor of line getAt(MeatList, n) of field the castNum of sprite 15 to 5
updateStage()
end repeat
end if
if the name of cast gWhichMenu = "AppsMenu" then
repeat with n = 1 to 3
set the foreColor of line getAt(AppsList, n) of field the castNum of sprite 15 to 5
updateStage()
end repeat
end if
if the name of cast gWhichMenu = "ExtraMenu" then
repeat with n = 1 to 3
set the foreColor of line getAt(ExtraList, n) of field the castNum of sprite 15 to 5
updateStage()
end repeat
end if
if the name of cast gWhichMenu = "PastaMenu" then
repeat with n = 1 to 3
set the foreColor of line getAt(PastaList, n) of field the castNum of sprite 15 to 5
updateStage()
end repeat
end if
if the name of cast gWhichMenu = "DessertMenu" then
repeat with n = 1 to 3
set the foreColor of line getAt(DessertList, n) of field the castNum of sprite 15 to 5
updateStage()
end repeat
end if
end if
end
on AllRecipes
global gWhichMenu
set the foreColor of line 2 of field gWhichMenu to 5
put " " into line 2 of field gWhichMenu
updateStage()
if the foreColor of field the castNum of sprite 15 = 5 then
nothing()
else
set the foreColor of field the castNum of sprite 15 to 5
updateStage()
end if
end
on WriteInfo
global gMacOrWin
set the textSize of field "FullInfo" to 14
put "E-Mail address: " & the text of field "E-Mail" & RETURN & "Name on check: " & the text of field "Name" & RETURN & "Phone Number: " & the text of field "PhoneNum" & RETURN & "Check Number: " & the text of field "CheckNum" & RETURN & "Amount of Check: " & the text of field "Amount" & RETURN & "Bank: " & the text of field "BankName" & RETURN & "Bank routing numbers: " & the text of field "BottomNums" & RETURN & "Comments: " & the text of field "Comments" & RETURN & "Access Code: 11" & gMacOrWin & the text of field "CodeNumber" && " (don't delete this number!)" & RETURN & RETURN & "Please E-Mail the above info to: lafingbird@aol.com" into field "FullInfo"
end
on PrintInfo
global gMacOrWin
set the textSize of field "FullInfo2" to 14
put "To: Laughing Bird Productions" & RETURN & "P.O.Box 807" & RETURN & "Dakota City, Nebraska" & RETURN & "68731" & RETURN & "- - - - - - - - - - - - - - - - - - - - - -" & RETURN & RETURN & "E-Mail Address: " & the text of field "E-Mail" & RETURN & "Name: " & the text of field "Name" & RETURN & "Amount of Check: " & the text of field "Amount" & RETURN & "Access Code: 11" & gMacOrWin & the text of field "CodeNumber" && " (don't delete this number!)" & RETURN & RETURN & "Additional comments?" into field "FullInfo2"
printInfoNow()
end
on CategoryRoll
if the visible of sprite 20 = 1 then
nothing()
else
set roller to 3
set startCast to the number of cast "PastaUp"
repeat with n = 0 to 8
if rollOver(roller + n) then
set the castNum of sprite (roller + n) to startCast + 1 + (n * 5)
next repeat
end if
set the castNum of sprite (roller + n) to startCast + (n * 5)
updateStage()
end repeat
end if
end
on PersonalRoll
global gAddEdit
if the visible of sprite 20 = 1 then
nothing()
else
if gAddEdit = 0 then
if rollOver(12) then
set the castNum of sprite 12 to the number of cast "PersonalRoll"
else
set the castNum of sprite 12 to the number of cast "PersonalUp"
updateStage()
end if
end if
if gAddEdit = 1 then
if rollOver(12) then
set the castNum of sprite 12 to the number of cast "Add/EditRoll"
else
set the castNum of sprite 12 to the number of cast "Add/EditUp"
updateStage()
end if
end if
end if
end
on CategoryButton
global gMenuWindow, gCatagory, gOpenGates, gAddEdit, gWhichMenu, gTheClickedCast
if the castNum of sprite 12 = the number of cast "Add/EditUp" then
set the castNum of sprite 12 to the number of cast "PersonalUp"
end if
set gAddEdit to 0
set Whichcast to the mouseCast
if the mouseCast = the number of cast gTheClickedCast then
set the castNum of sprite 15 to the number of cast "Dot"
puppetTransition(10, 1, 10)
updateStage()
if gWhichMenu = "ShowAllMenu 2" then
set the castNum of sprite 15 to the number of cast Whichcast + 12
else
set the castNum of sprite 15 to the number of cast Whichcast + 3
end if
puppetTransition(9, 1, 10)
updateStage()
set the castNum of sprite 16 to the number of cast Whichcast + 2
set gCatagory to the name of cast (Whichcast + 2)
updateStage()
set the textSize of line 1 of field gWhichMenu to 18
updateStage()
if gOpenGates = 0 then
ActiveRecipes()
else
AllRecipes()
end if
else
nothing()
end if
end
on RecipeSelect
global theChoice, gPersonalSelected
set vname to theChoice
if vname = 0 then
exit
else
put the text of cast vname into field "Printfield"
end if
updateStage()
initPush(2, 12, 0)
init(15, 16, 0)
set gPersonalSelected to 0
end
on PersonalCategoryButton
global gMenuWindow, gCatagory, gAddEdit, gTheClickedCast
set Whichcast to the mouseCast
if the mouseCast = the number of cast gTheClickedCast then
set the castNum of sprite gMenuWindow to the number of cast "Dot"
puppetTransition(10, 1, 10)
updateStage()
set the castNum of sprite gMenuWindow to the number of cast Whichcast + 3
puppetTransition(9, 1, 10)
updateStage()
set the castNum of sprite 16 to the number of cast Whichcast + 2
set gCatagory to the name of cast (Whichcast + 2)
updateStage()
puppetSprite(19, 1)
set the castNum of sprite 19 to the number of cast "Add buttonUP"
puppetTransition(9, 1, 10)
updateStage()
set the visible of sprite 25 to 1
set the foreColor of sprite 15 to 5
updateStage()
repeat with PersonalButtonFlash = 279 to 281
set the castNum of sprite 12 to PersonalButtonFlash
updateStage()
wait(2)
end repeat
puppetSound("GlowSound")
repeat with PersonalButtonFlash = 281 down to 279
set the castNum of sprite 12 to PersonalButtonFlash
updateStage()
wait(2)
end repeat
set the castNum of sprite 12 to the number of cast "Add/EditUp"
set gAddEdit to 1
puppetTransition(9, 1, 10)
updateStage()
else
nothing()
end if
end
on PersonalRecipeSelect
global theChoice, gPersonalSelected, gNewRecipe
set vname to theChoice
set the text of field "Printfield" to gNewRecipe && RETURN && RETURN & the text of field gNewRecipe
updateStage()
initPush(2, 12, 0)
init(15, 16, 0)
puppetSprite(25, 0)
set gPersonalSelected to 1
end
on AddButton
initPush(3, 12, 0)
puppetSprite(19, 0)
init(15, 16, 0)
go("add your own")
end
on About
set the visible of sprite 20 to 1
puppetTransition(9, 1, 5)
updateStage()
end
on PrintMainQuitRoll
set roller to 4
set startCast to the number of cast "printUp"
repeat with n = 0 to 1
if rollOver(roller + n) then
set the castNum of sprite (roller + n) to startCast + 1 + (n * 3)
next repeat
end if
set the castNum of sprite (roller + n) to startCast + (n * 3)
updateStage()
end repeat
end
on GoMain
global gAddButtonOn, gAddEdit
initPush(4, 13, 0)
set the castNum of sprite 19 to the number of cast "Dot"
updateStage()
set the visible of sprite 25 to 0
go("Main")
set the visible of sprite 14 to 1
set the visible of sprite 9 to 1
set the visible of sprite 10 to 1
set gAddEdit to 0
set gAddButtonOn to 1
set the visible of sprite 16 to 1
end
on NextRecipe
global gPersonalSelected, gLastCast
set gLastCast to the number of cast "EnterNewRecipe"
if gPersonalSelected = 0 then
put value(the text of field "count") + 1 into field "Count"
if the text of field "count" > 215 then
put "215" into field "Count"
put the text of cast 215 into field "PrintField"
else
put the text of field value(the text of field "count") into field "PrintField"
end if
end if
if gPersonalSelected = 1 then
set NumOfNewRecipes to the number of lines in field "PersonalMenu" - 1
put value(the text of field "count") + 1 into field "Count"
if the text of field "count" > NumOfNewRecipes then
put NumOfNewRecipes into field "Count"
put the name of cast (NumOfNewRecipes + gLastCast) && RETURN && RETURN && the text of cast (NumOfNewRecipes + gLastCast) into field "PrintField"
updateStage()
else
put the name of cast (value(the text of field "count") + gLastCast) && RETURN && RETURN && the text of cast (value(the text of field "count") + gLastCast) into field "PrintField"
end if
end if
end
on LastRecipe
global gPersonalSelected, gLastCast
set gLastCast to the number of cast "EnterNewRecipe"
if gPersonalSelected = 0 then
put value(the text of field "count") - 1 into field "Count"
if the text of field "count" < 1 then
put "1" into field "Count"
put the text of cast 1 into field "PrintField"
else
put the text of field value(the text of field "count") into field "PrintField"
end if
end if
if gPersonalSelected = 1 then
set NumOfNewRecipes to the number of lines in field "PersonalMenu" - 1
put value(the text of field "count") - 1 into field "Count"
if the text of field "count" = "0" then
put "1" into field "Count"
set RecipeName to the name of cast (gLastCast + 1)
set RecipeText to the text of cast (gLastCast + 1)
put RecipeName & RETURN & RETURN & RecipeText into field "Printfield"
updateStage()
else
put the name of cast (value(the text of field "count") + gLastCast) && RETURN && RETURN && the text of cast (value(the text of field "count") + gLastCast) into field "PrintField"
end if
end if
end
on AddEditRoll
set roller to 9
set startCast to the number of cast "AddUp"
repeat with n = 0 to 1
if rollOver(roller + n) then
set the castNum of sprite (roller + n) to startCast + 1 + (n * 3)
next repeat
end if
set the castNum of sprite (roller + n) to startCast + (n * 3)
updateStage()
end repeat
end
on AddNewRecipe
global gNewRecipeName
put the text of field "EnterNewRecipe" into field "NewRecipeField"
duplicate(cast "NewRecipeField")
if (the text of field "Title of New Recipe" = EMPTY) or (the text of field "Title of New Recipe" = "Enter the Title of the recipe here") then
alert("Please name this recipe... THEN click the 'Save' button")
put "Enter the Title of the recipe here" into field "Title of New Recipe"
exit
end if
set NumOfLines to the number of lines in field "Title of New Recipe"
if NumOfLines > 1 then
alert("The Title is too long. One line of text will do.")
set the text of field "Title of New Recipe" to "Enter the Title of the recipe here"
exit
end if
if (the text of field "EnterNewRecipe" = Blank) or (the text of field "EnterNewRecipe" = "Enter New Recipe Here") then
alert("Enter your recipe... THEN click the 'Save' button")
put "Enter New Recipe Here" into field "EnterNewRecipe"
exit
end if
if char 1 to 5 of field "Title of New Recipe" = " " then
delete char 1 to 5 of field "Title of New Recipe"
end if
set the name of cast "NewRecipeField" to the text of field "Title Of New Recipe"
set gNewRecipeName to the text of field "Title Of New Recipe"
set the text of field "EnterNewRecipe" to "Enter New Recipe Here"
set the text of field "Title Of New Recipe" to "Enter the Title of the recipe here"
updateStage()
AddTheRecipe()
end
on AddTheRecipe
global gNumber, gNewRecipeName
if line 1 of field "PersonalMenu" = "EMPTY" then
delete line 1 of field "PersonalMenu"
end if
set gNumber to the number of lines in field "PersonalMenu"
put gNumber & ") " & gNewRecipeName & RETURN after line gNumber of field "PersonalMenu"
put the text of field "PersonalMenu" into field "EditField"
alert("Your recipe has been added successfully!")
end
on ResetAll
global gAddButtonOn
set the visible of sprite 5 to 0
set the visible of sprite 6 to 0
puppetTransition(10, 1, 10)
updateStage()
set the text of field "Title Of New Recipe" to "Enter the Title of the recipe here"
set the castNum of sprite 5 to the number of cast "Title Of New Recipe"
set the castNum of sprite 6 to the number of cast "EnterNewRecipe"
set the visible of sprite 5 to 1
set the visible of sprite 6 to 1
set the castNum of sprite 12 to the number of cast "One"
puppetTransition(1, 1, 10)
set the visible of sprite 14 to 0
updateStage()
set gAddButtonOn to 1
end
on EditRecipe
global gOldTitleOfRecipe, gAddButtonOn
set the visible of sprite 16 to 0
set the castNum of sprite 12 to the number of cast "Dot"
puppetTransition(6, 1, 5)
updateStage()
set the castNum of sprite 12 to the number of cast "Two"
puppetTransition(5, 1, 5)
updateStage()
set the castNum of sprite 6 to the number of cast "Dot"
puppetTransition(9, 1, 5)
updateStage()
set the castNum of sprite 6 to the number of cast "EditField"
set the editableText of sprite 5 to 0
put "Edit Mode" into field "Title Of New Recipe"
puppetTransition(10, 1, 5)
updateStage()
set gAddButtonOn to 0
end
on SelectTheTextToEdit
global theChoice, gOpenGates, gRecipeToEditTitle, gOldTitleOfRecipe, gTheSelectedLineNumber, theText
set newLine to the mouseLine
set the foreColor of line newLine of field "EditField" to 35
puppetSound("Click2")
updateStage()
wait(30)
set the foreColor of line newLine of field "EditField" to 5
wait(40)
set theText to line newLine of field "EditField"
set numEnd to offset(")", theText)
if numEnd > 0 then
set theSelection to char 1 to numEnd - 1 of theText
set gRecipeToEditTitle to word 2 to the number of words in theText of theText
set gTheSelectedLineNumber to char 1 to numEnd - 1 of theText
set the castNum of sprite 6 to the number of cast "Dot"
puppetTransition(9, 1, 5)
updateStage()
put the text of field gRecipeToEditTitle into field "EditMode"
set gOldTitleOfRecipe to gRecipeToEditTitle
put gRecipeToEditTitle into field "Title Of New Recipe"
set the castNum of sprite 6 to the number of cast "EditMode"
puppetTransition(10, 1, 5)
updateStage()
set the castNum of sprite 12 to the number of cast "Dot"
puppetTransition(6, 1, 5)
updateStage()
set the castNum of sprite 12 to the number of cast "Three"
puppetTransition(5, 1, 5)
updateStage()
set the editableText of sprite 5 to 1
set the visible of sprite 14 to 1
else
exit
end if
end
on EditedRecipe
global gEditedRecipeName, gOldTitleOfRecipe, gTheSelectedLine
set the editableText of sprite 5 to 1
set gEditedRecipeName to the text of cast "Title Of New Recipe"
set gNumOfLines to the number of lines in field "Title Of New Recipe"
if gNumOfLines > 1 then
alert("Title is too long. One line of text will do.")
set the text of field "Title Of New Recipe" to line 1 of gEditedRecipeName
exit
end if
set the text of cast gOldTitleOfRecipe to the text of cast "EditMode"
set the name of cast gOldTitleOfRecipe to gEditedRecipeName
updateStage()
put value(gTheSelectedLineNumber) & ") " & gEditedRecipeName into line value(gTheSelectedLineNumber) of field "personalMenu"
set the text of field "EditField" to the text of field "PersonalMenu"
alert("Your recipe has been edited successfully!")
ResetAll()
set the visible of sprite 16 to 1
end
on PasteIt
global WhichIsSelected
pasteClipBoardInto(cast 2000)
set WordCount to the number of words in field WhichIsSelected
put the text of cast 2000 after word WordCount of field WhichIsSelected